package com.innjia.sys.service.impl;

        import com.innjia.base.utils.PageUtils;
		import com.innjia.base.utils.Utils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.innjia.sys.dao.WishListDao;
import com.innjia.sys.entity.WishListEntity;
import com.innjia.sys.service.WishListService;



@Service("wishListService")
public class WishListServiceImpl implements WishListService {
	@Autowired
	private WishListDao wishListDao;
	
	@Override
	public WishListEntity queryObject(String id){
		return wishListDao.queryObject(id);
	}
	
	@Override
	public List<WishListEntity> queryList(Map<String, Object> map){
		return wishListDao.queryList(map);
	}

    @Override
    public List<WishListEntity> queryListByBean(WishListEntity entity) {
        return wishListDao.queryListByBean(entity);
    }
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return wishListDao.queryTotal(map);
	}
	
	@Override
	public int save(WishListEntity wishList){
		wishList.setId(Utils.uuid());
		return wishListDao.save(wishList);
	}
	
	@Override
	public int update(WishListEntity wishList){
        return wishListDao.update(wishList);
	}
	
	@Override
	public int delete(String id){
        return wishListDao.delete(id);
	}
	
	@Override
	public int deleteBatch(String[] ids){
        return wishListDao.deleteBatch(ids);
	}

	@Override
	public List<WishListEntity> queryPageListByBean(WishListEntity entity, PageUtils pageUtil) {
		int total = this.wishListDao.totalByBean(entity);
		pageUtil.setTotalCount(total);
		List<WishListEntity> list = this.wishListDao.queryPageListByBean(entity,pageUtil);
		return list;
	}

}
